package br.com.inner.service;

import java.math.BigDecimal;
import java.util.List;

import br.com.inner.custom.CustomException;
import br.com.inner.dao.JobDBDao;
import br.com.inner.dao.JobDao;
import br.com.inner.dao.UsuarioDBDao;
import br.com.inner.dao.UsuarioDao;
import br.com.inner.modelo.Job;
import br.com.inner.modelo.JobEmpresa;
import br.com.inner.modelo.StatusJob;
import br.com.inner.modelo.Usuario;

public class JobDaoService implements JobService {

	private JobDao dao;

	public JobDaoService() {
        this.dao = new JobDBDao();
    }
	
	public void delete(BigDecimal cdJob) {
		// TODO Auto-generated method stub
		dao.delete(cdJob);
	}

	public List<Job> getJob(Usuario usu) throws CustomException {
		// TODO Auto-generated method stub
		return dao.getJob(usu);
	}

	public void insert(Job job) throws CustomException {
		// TODO Auto-generated method stub
		dao.insert(job);
	}
	
	public Job getDetalheJob(BigDecimal cdJob) throws CustomException{
		return dao.getDetalheJob(cdJob);
	}
	
	public List<JobEmpresa> getJobDetalheJobEnviado(BigDecimal cdJob) throws CustomException{
		return dao.getJobDetalheJobEnviado(cdJob);
	}
	
	public void update(Job job) throws CustomException{
		dao.update(job);
	}
	
	public void atualizaJob(BigDecimal cdJob, BigDecimal cdUsuario, StatusJob status)throws CustomException{
		dao.atualizaJob(cdJob, cdUsuario, status);
	}
	
	public JobEmpresa getJobEmpresa(BigDecimal cdJob, BigDecimal cdUsuario)throws CustomException{
		return dao.getJobEmpresa(cdJob, cdUsuario);
	}
}
